package hv.fmw.core.configure {
	import hv.fmw.core.command.Command;
	import hv.fmw.core.command.ICommand;
	import hv.fmw.utils.Config;
	import flash.display.Stage;
	/**
	 * @author hvong
	 */
	public class ConfigureCmd extends Command implements ICommand {
		
		public function ConfigureCmd(stage:Stage) {
			Config.init(stage.loaderInfo);
		}

		public function execute() : void {
			if(Config.getFlashVar("config")){
				Config.setPath("config", Config.getFlashVar("config"));
			} else {
				Config.setPath("config", Config.getPath() + "xml/config.xml");
			}
			super.complete();
		}
	}
}
